<template>
	<view class="uni_box home">
		<!-- <navbar title='展示中'>
		</navbar> -->
		<view class="content">
			
			<!-- <image class="img_bjtuan" src="/static/img/img_bjtuan.png"></image> -->
			<view class="qianview">
				<view class="hbg">
					<view class="jione">
						<image class="icon_back" src="/static/img/icon_back.png" @click="getfan"></image>
						<text class="htit">发布/管理悬赏</text>
					</view>
					<view class="jitwo">
						<view class="jitou">
							<image class="tous" :src="info.avatar?info.avatar:'/static/mine/tous.png'"></image>
							<view class="toubot" v-if="info.vip==1">
								<image class="icon_hy" src="/static/img/icon_hy.png"></image>
								<text class="huitit">会员</text>
							</view>
						</view>
						<view class="jiright">
							<text class="tname">{{ info.nickname }}</text>
							<view class="tlist">
								<text class="idnum">ID:{{info.id}}</text>
								<text class="xuanname">悬赏主金额(元):</text>
							</view>
							<view class="tlist" style="margin-top: 8rpx;">
								<view class="yishiming">
									<image class="icon_sm" src="/static/img/icon_sm.png"></image>
									<text class="yiname">{{ info.is_shiming==1?'已实名认证':'未实名认证' }}</text>
								</view>
								<text class="xuanprice" @click="getyue">{{info.money}}</text>
								<image class="ricons"  @click="getyue" src="/static/img/ricons.png"></image>
							</view>
						</view>
					</view>
				</view>
				<view class="glist">
					<!-- <view class="gitem">
						<text class="biao">项目发布次数</text>
						<text class="biaotwo">{{ info.quan_free_add }}</text>
					</view> -->
					<view class="gitem">
						<text class="biao">项目置顶次数</text>
						<text class="biaotwo">{{ info.quan_free_top }}</text>
					</view>
					<view class="gitem">
						<text class="biao">项目刷新次数</text>
						<text class="biaotwo">{{ info.quan_free_fresh }}</text>
					</view>
					<!-- <view class="gitem">
						<text class="biao">悬赏发布次数</text>
						<text class="biaotwo">{{ info.shang_free_add }}</text>
					</view> -->
					<view class="gitem">
						<text class="biao">悬赏置顶次数</text>
						<text class="biaotwo">{{ info.shang_free_top }}</text>
					</view>
					<view class="gitem">
						<text class="biao">悬赏刷新次数</text>
						<text class="biaotwo">{{ info.shang_free_fresh }}</text>
					</view>
					<view class="gitem">
						<text class="biao">查看卡次数</text>
						<text class="biaotwo">{{ info.quan_free_show }}</text>
					</view>
					<view class="gitem">
						<text class="biao">超级置顶次数</text>
						<text class="biaotwo">{{ info.quan_free_top }}</text>
					</view>
				</view>
				
				<view class="xuanview" v-if="list1">
					<text class="xuantit">{{list1.title}}</text>
					<view class="xulist">
						<view class="xuitem" v-for="(item,index) in list1.data" :key="index" @click="getorder(item)">
							<image class="gones" :src="item.image?item.image:'/static/img/gone.png'"></image>
							<text>{{item.name}}</text>
						</view>
					</view>
				</view>
				<view class="xuanview" v-if="list2">
					<text class="xuantit">{{list2.title}}</text>
					<view class="xulist">
						<view class="xuitem" v-for="(item,index) in list2.data" :key="index" @click="getordertwo(item,index)">
							<image class="gones" :src="item.image?item.image:'/static/img/gone.png'"></image>
							<text>{{item.name}}</text>
						</view>
					</view>
				</view>
			</view>


			<!-- 发布图标 -->
			<view class="fabu" @click="getfabu">
				<image class="fabuimg" src="/static/img/fabu.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				teaminfo:[],
				glist:[
					{id:1,name:'待审核',img:'/static/img/gone.png'},
					{id:2,name:'展示中',img:'/static/img/gtwo.png'},
					{id:3,name:'已暂停',img:'/static/img/gthree.png'},
					{id:4,name:'审核失败',img:'/static/img/gfour.png'},
					{id:5,name:'退款悬赏',img:'/static/img/gfive.png'},
					{id:6,name:'任务记录',img:'/static/img/gsix.png'},
					{id:7,name:'订单纠纷',img:'/static/img/gseven.png'},
				],
				info:{},
				menu:[],
				list1:{},
				list2:{},
			}
		},
		onLoad() {
			this.getinit();
		},
		onShow() {
			this.fgetShopInfo();//获取信息
		},
		methods: {
			async getinit(){
				
				// this.fgetShopInfo();//获取信息
				this.fmaingetMenu();//获取菜单
			},
			async fgetShopInfo(){
				let res = await this.$u.api.getShopInfo({
				});
				this.info = res
			},
			async fmaingetMenu(){
				let res = await this.$u.api.maingetMenu({
				});
				this.list1 = res.list1
				this.list2 = res.list2
				console.log(this.list1)
			},
			getji(e){
				this.navrouter("/pages_subject/twoPage/MyTeamList?type="+e);
			},
			getfan(){
				uni.navigateBack()
			},
			getyao(){
				this.navrouter('/pages/TPage/YaoPage')
			},
			getfabu(){
				this.navrouter('/pages_subject/twoPage/VipXieyi')
			},
			getyue(){
				this.navrouter('/pages_subject/twoPage/ZhangHu')
			},
			getorder(item){
				this.navrouter(item.page)
				// this.navrouter('/pages_subject/twoPage/FabuOrder')
			},
			getordertwo(item,index){
				if(index == 0){
					//待审核
					this.navrouter('/pages_subject/twoPage/DinOrder?status=0')
				}else if(index == 1){
					//已结算
					this.navrouter('/pages_subject/twoPage/DinOrder?status=1')
				}else if(index == 2){
					//订单纠结
					// 跳转富文本
					this.navrouter('/pages/TPage/Xieyi?type=dingdanjiujie')
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fff;
	}
	.content{
		min-height: 100vh;
		background-color: #fff;
		position: relative;
		.hbg{
			position: relative;
			width: 100%;
			height: 440rpx;
			background: #0CB0FD;

		}
		.xuanview{
			background: #FFFFFF;
			border-radius: 20rpx 20rpx 0 0;
			margin-top: -30rpx;
			padding: 30rpx;
			position: relative;
			.xuantit{
				font-weight: bold;
				font-size: 32rpx;
				color: #111111;
				display: block;
				margin-bottom: 40rpx;

			}
			.xulist{
				display: flex;
				flex-direction: row;
				flex-wrap: wrap;
				.xuitem{
					width: 25%;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
					margin-bottom: 20rpx;
					.gones{
						width: 68rpx;
						height: 68rpx;
						margin-bottom: 4rpx;
					}
					text{
						font-weight: 500;
						font-size: 24rpx;
						color: #333333;
					}
				}
			}
		}
		.img_bjtuan{
			position: absolute;
			width: 100%;
			height: 100%;
		}

		.jitwo{
			display: flex;
			flex-direction: row;
			align-items: center;
			position: relative;
			padding: 70rpx 40rpx 40rpx;
			.jitou{
				width: 124rpx;
				position: relative;
				height: 124rpx;
				border-radius: 50%;
				border: 3rpx solid #fff;
				.tous{
					position: absolute;
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
				.toubot{
					background: linear-gradient(1deg, #454545, #888888);
					border-radius: 5rpx;
					position: absolute;
					width: 100%;
					padding: 5rpx 0;
					bottom: -10rpx;
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: center;
					.icon_hy{
						width: 30rpx;
						height: 30rpx;
						margin-right: 10rpx;
					}
					text{
						font-weight: 500;
						font-size: 20rpx;
						color: #FFFFFF;
					}
				}
				
			}
			.jiright{
				padding-left: 30rpx;
				display: flex;
				flex-direction: column;
				flex: 1;

				.tname{
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 36rpx;
					color: #FFFFFF;
				}
				.tlist{
					display: flex;
					flex-direction: row;
					align-items: center;
					width: 100%;
					margin-top: 14rpx;
					.yishiming{
						padding: 4rpx 10rpx;
						background: rgba(255,255,255,0.3);
						border-radius: 5rpx;
						display: flex;
						flex-direction: row;
						align-items: center;
						.icon_sm{
							width: 24rpx;
							height: 24rpx;
							margin-right: 4rpx;
						}
						.yiname{
							font-weight: 500;
							font-size: 20rpx;
							color: #FFFFFF;
						}

					}
					.idnum{
						font-weight: 500;
						font-size: 24rpx;
						color: #FFFFFF;
					}
					.xuanname{
						font-weight: 500;
						font-size: 20rpx;
						color: #FFFFFF;
						margin-left: auto;
						display: inline-block;
					}
					.xuanprice{
						font-size: 40rpx;
						color: #FFFFFF;
						color: #FFFFFF;
						margin-left: auto;
						display: inline-block;
					}
					.ricons{
						margin-left: 8rpx;
						width: 24rpx;
						height: 24rpx;
					}
				}
			}
		}
		.qianview{
			position: relative;
			
			.jione{
				position: relative;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: center;
				padding: 30rpx 0 0 30rpx;
				// #ifdef APP-PLUS
				padding-top: 70rpx;
				// #endif
			}
			.icon_back{
				width: 35rpx;
				height: 35rpx;
				position: absolute;
				left: 30rpx;

			}
			.htit{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #FFFFFF;
			}
			.jiview{
				margin-left: auto;
				width: 126rpx;
				height: 60rpx;
				background: rgba(0,0,0,0.2);
				border-radius: 30rpx 0rpx 0rpx 30rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				.jilu{
					width: 44rpx;
					height: 44rpx;
					margin-right: 4rpx;
				}
				.jitit{
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}
		}
		.tone{
			margin: 45rpx;
			position: relative;
			height: 690rpx;
			// padding: 0 0 0 30rpx;
			.tnav{
				position: absolute;
				width: 100%;
				height: 100%;

			}
			.toneview{
				position: relative;
				width: 100%;
				height: 100%;
				display: flex;
				flex-direction: column;

			}
			.tbiao{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FBE062;
				display: flex;
				align-items: center;
				justify-content: center;
				height: 43px;
				margin-bottom: 50rpx;

			}
			.tming{
				// margin-top: 60rpx;
				margin-bottom: 20rpx;
				display: flex;
				flex-direction: row;
				align-items: center;
				.mname{
					font-family: Source Han Sans CN;
					font-weight: bold;
					font-size: 60rpx;
					color: #F52517;
					width: 18%;
					display: flex;
					align-items: center;
					justify-content: center;
				}
				.mright{
					flex: 1;
					padding: 30rpx 30rpx;
					background: #F2EDDF;
					border-radius: 16rpx;
					margin-right: 40rpx;
					text{
						display: block;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 26rpx;
						color: #F52517;
						display: block;
						margin-bottom: 4rpx;
					}
					text:last-child{
						margin-bottom: 0;
					}
				}
			}
		}
		.ttwo{
			position: relative;
			margin: 100rpx 60rpx 30rpx;
			height: 116rpx;
			.btn_an{
				position: absolute;
				width: 100%;
				height: 100%;
			}
			.yaoview{
				position: relative;
				width: 100%;
				height: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #6C420C;
			}
		}

		.tthree{
			padding: 30rpx;
			display: flex;
			flex-direction: column;
			.youlist{
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				.youitem{
					width: 48%;
					padding: 20rpx 30rpx;
					background: #FFFFFF;
					border-radius: 20rpx;
					display: flex;
					flex-direction: column;
					.youone{
						display: flex;
						flex-direction: row;
						align-items: center;
						.oneicon{
							width: 32rpx;
							height: 32rpx;
							margin-right: 8rpx;
						}
						.yitit{
							font-family: PingFang SC;
							font-weight: bold;
							font-size: 28rpx;
							color: #000000;
						}
					}
					.yname{
						display: block;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #666666;
						margin-top: 10rpx;
					}
					.ynum{
						color: #F54320;
						display: inline-block;
						margin: 0 4rpx;
						font-size: 32rpx;
					}
				}
				.ml{
					margin-left: auto;
				}
			}
			.jiviewbot{
				display: flex;
				flex-direction: row;
				padding-bottom: 40rpx;
				margin-top: 50rpx;
				align-items: center;
				.jiitem{
					width: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					flex-direction: column;
					.img_yj{
						width: 110rpx;
						height: 110rpx;
						margin-bottom: 9rpx;
					}
					.yjname{
						font-family: PingFang SC;
						font-weight: bold;
						font-size: 24rpx;
						color: #FFFFFF;
					}
					.yjnum{
						font-weight: bold;
						font-size: 36rpx;
						color: #FFFFFF;
					}
				}
				.shu{
					display: inline-block;
					width: 2rpx;
					height: 50rpx;
					background: #EEEEEE;
					opacity: 0.5;
				}
			}
		}
	}
	
	.fabu{

		position: fixed;
		right: 30rpx;
		bottom: 8%;
		.fabuimg{
			width: 120rpx;
			height: 120rpx;
		}
	}
	.glist{
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		margin: 30rpx;
		border-radius: 20rpx;
		border: 1rpx solid #eee;
		padding: 30rpx 0 0;
		.gitem{
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			width: 33.33%;
			margin-bottom: 30rpx;
			.micon{
				margin-bottom: 10rpx;
				width: 68rpx;
				height: 68rpx;
			}
			.micontwo{
				margin-bottom: 10rpx;
				width: 48rpx;
				height: 48rpx;
			}
			.biaotwo{
				font-weight: 500;
				font-size: 30rpx;
				color: #333;
				display: inline-block;
				margin-top: 8rpx;
			}
			.biao{
				color: #666;
				font-size: 28rpx;
				font-weight: 500;
			}
		}
		.gitemone{
			width: 20%;
		}
	}
</style>
